<?php $path = base_url().'public/frontend/';?>
<h2 class="title text-center">USER INFORMATION</h2>
<section id="form" style="margin-bottom: 15px;
                        margin-top: 15px;">
    <div class="row">
            <div class="login-form">
                <form method="post">
                    <div class="row" style="width: 800px;height: 200px;margin-left: 20px">
                        <div class="col-sm-4">
                            <img src="<?php
                            if (strpos($url_image, '//'))
                                echo $url_image;
                            else echo base_url().'public/images/'.$url_image; ?>" class="img-responsive" style="height: 200px;
                                                                                                        width: 200px; position: relative" alt=""/>
                        </div>
                        <div class="col-sm-6">
                            <h1 style="margin:0%;color: #666663"><?php echo $username?></h1>
                            <h2>User Type: <span><i><?php echo $usergroup_name?></i></span></h2>
                            <h2>Discount: <span><i><?php echo $discount?></i></span></h2>
                            <h2>Registration Date: <span><i><?php echo $register_date?></i></span></h2>
                        </div>
                        <div class="col-sm-2">
                            <a href="<?php echo base_url() ;?>frontend/user/editInformation"
                               class="btn btn-default"
                               style="background: orange;border: medium none;
                                    border-radius: 0;
                                    color: #FFFFFF;">Edit</a>
                        </div>
                    </div>
                    <div class="row" style="width: 800px;height: 200px;margin-left: 50px;margin-top: 50px;text-align: left">
                        <div class="col-sm-6">
                            <h2>Full Name: <span><i><?php echo $full_name?></i></span></h2>
                            <h2>Gender: <?php if ($gender == 1){
                                    ?><span><i>Male</i></span></h2>
                                        <?php }
                                    else{ ?>
                                        <span><i>Female</i></span></h2>
                                    <?php }?>
                            <h2>Date of Birth: <span><i><?php echo $date_of_birth?></i></span></h2>
                            <h2>Address: <span><i><?php echo $address?></i></span></h2>
                        </div>
                        <div class="col-sm-6">
                            <h2>Cellphone: <span><i><?php echo $tel?></i></span></h2>
                            <h2>Email: <span><i><?php echo $email?></i></span></h2>
                            <h2>Id Card: <span><i><?php echo $id_card?></i></span></h2>
                        </div>
                    </div>
                </form>
            </div>
    </div>
    <div class="row">
        <div class="category-tab shop-details-tab"><!--category-tab-->
            <div class="col-sm-12">
                <ul class="nav nav-tabs">
                    <li><a href="#details" data-toggle="tab">Shipment Delivered</a></li>
                    <li class="active"><a href="#reviews" data-toggle="tab">Shipment Waiting For Validation</a></li>
                </ul>
            </div>
            <div class="tab-content">
                <div class="tab-pane fade" id="details">
                    <form method="post">
                        <div class="table-responsive cart_info">
                            <table class="table table-condensed">
                                <thead style="background: #FE980F; color: #ffffff">
                                    <tr class="cart_menu">
                                        <td class="image" style="width: 100px">Order ID</td>
                                        <td class="description" style="width: 150px">Purchase Date</td>
                                        <td class="price" style="width: 150px">Contact Number</td>
                                        <td class="quantity" style="width: 100px">Total</td>
                                        <td class="total">Received Date</td>
                                        <td class="total">Received Time</td>
                                        <td></td>
                                    </tr>
                                </thead>
                                <tbody id="tbody">
                                    <?php foreach($invoices as $invoice) { if ($invoice['status'] ==1) { ?>
                                        <tr>
                                            <td class="cart_product"><?php echo $invoice['invoice_id'] ?></td>
                                            <td class="cart_description"><?php echo $invoice['invoice_date'] ?></td>
                                            <td class="cart_price"><?php echo $invoice['contact_number'] ?></td>
                                            <td class="cart_quantity">$<?php echo $invoice['total'] ?></td>
                                            <td class="cart_total"><?php echo $invoice['received_date'] ?></td>
                                            <td class="cart_total"><?php echo $invoice['received_time'] ?></td>
                                            <td><a href="<?php echo base_url() ;?>frontend/user/viewOrder/<?php echo $invoice['invoice_id'] ?>"
                                                   class="btn btn-default"
                                                   style="background: orange;border: medium none;
                                                    border-radius: 0;
                                                    color: #FFFFFF;">View Detail</a></td>
                                        </tr>
                                    <?php } }?>
                                </tbody>
                            </table>
                        </div>
                    </form>
                </div>

                <div class="tab-pane fade active in" id="reviews" style="padding-left: 0px; padding-right: 0px">
                    <form method="post">
                        <div class="table-responsive cart_info">
                            <table class="table table-condensed">
                                <thead style="background: #FE980F; color: #ffffff">
                                <tr class="cart_menu">
                                    <td class="image" style="width: 100px">Order ID</td>
                                    <td class="description" style="width: 150px">Purchase Date</td>
                                    <td class="price" style="width: 150px">Contact Number</td>
                                    <td class="quantity" style="width: 100px">Total</td>
                                    <td class="total">Received Date</td>
                                    <td class="total">Received Time</td>
                                    <td></td>
                                </tr>
                                </thead>
                                <tbody id="tbody">
                                <?php foreach($invoices as $invoice) { if ($invoice['status'] ==0) { ?>
                                    <tr>
                                        <td class="cart_product"><?php echo $invoice['invoice_id'] ?></td>
                                        <td class="cart_description"><?php echo $invoice['invoice_date'] ?></td>
                                        <td class="cart_price"><?php echo $invoice['contact_number'] ?></td>
                                        <td class="cart_quantity">$<?php echo $invoice['total'] ?></td>
                                        <td class="cart_total"><?php echo $invoice['received_date'] ?></td>
                                        <td class="cart_total"><?php echo $invoice['received_time'] ?></td>
                                        <td><a href="<?php echo base_url() ;?>frontend/user/viewOrder/<?php echo $invoice['invoice_id'] ?>"
                                               class="btn btn-default"
                                               style="background: orange;border: medium none;
                                                    border-radius: 0;
                                                    color: #FFFFFF;">View Detail</a></td>
                                    </tr>
                                <?php } }?>
                                </tbody>
                            </table>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>
    <script>

    </script>
</section>